package com.solution.model;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * UserType
 */
@Entity
@Table(name="User_Type"
    ,schema="public"
)
public class UserType extends AbstractPO
 {

	
	private static final long serialVersionUID = 1L;
	
    private UserTypeId id;
    private UserInfo userInfo;

     @EmbeddedId
    
    @AttributeOverrides( {
        @AttributeOverride(name="userInfoId", column=@Column(name="User_InfoID", nullable=false, precision=10, scale=0) ), 
        @AttributeOverride(name="entityId", column=@Column(name="EntityID", nullable=false, precision=10, scale=0) ) } )
    public UserTypeId getId() {
        return this.id;
    }
    
    public void setId(UserTypeId id) {
        this.id = id;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="User_InfoID", nullable=false, insertable=false, updatable=false)
    public UserInfo getUserInfo() {
        return this.userInfo;
    }
    
    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }




}


